package entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

public class Customer_loss implements Serializable {
    private Integer id;
    private Integer customer_id;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date last_order_time;
    private String measure;
    private String measure_append;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date loss_date;
    private String reason;
    private String status;
    //关联到用户的名称
    private Customer customer;


    public Customer getCustomer() {
        return customer;
    }

    public void setCustomer(Customer customer) {
        this.customer = customer;
    }

    public Customer_loss(){

    }
    public Customer_loss(Integer id, Integer customer_id, Date last_order_time, String measure, String measure_append, Date loss_date, String reason, String status) {
        this.id = id;
        this.customer_id = customer_id;
        this.last_order_time = last_order_time;
        this.measure = measure;
        this.measure_append = measure_append;
        this.loss_date = loss_date;
        this.reason = reason;
        this.status = status;
    }

    @Override
    public String toString() {
        return "Customer_loss{" +
                "id=" + id +
                ", customer_id=" + customer_id +
                ", last_order_time=" + last_order_time +
                ", measure='" + measure + '\'' +
                ", measure_append='" + measure_append + '\'' +
                ", loss_date=" + loss_date +
                ", reason='" + reason + '\'' +
                ", status='" + status + '\'' +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCustomer_id() {
        return customer_id;
    }

    public void setCustomer_id(Integer customer_id) {
        this.customer_id = customer_id;
    }

    public Date getLast_order_time() {
        return last_order_time;
    }

    public void setLast_order_time(Date last_order_time) {
        this.last_order_time = last_order_time;
    }

    public String getMeasure() {
        return measure;
    }

    public void setMeasure(String measure) {
        this.measure = measure;
    }

    public String getMeasure_append() {
        return measure_append;
    }

    public void setMeasure_append(String measure_append) {
        this.measure_append = measure_append;
    }

    public Date getLoss_date() {
        return loss_date;
    }

    public void setLoss_date(Date loss_date) {
        this.loss_date = loss_date;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
